<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>添加订单页面</title>
<link rel="stylesheet" href="layui/css/layui.css" />
</head>
<body>
	<form class="layui-form"  style="margin-top: 20px;">
		<div class="layui-form-item">
			<label class="layui-form-label">订单名称：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_name" id="of_name" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">收货地址：</label>
			<div class="layui-input-inline">
				<input type="text" name="u_id" id="u_id" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">订单总额：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_total" id="of_total" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">下单时间：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_ordertime" id="of_ordertime" required
					lay-verify="required" class="layui-input" placeholder="yyyy-MM-dd HH:mm:ss">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">发货时间：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_deliverytime" id="of_deliverytime" required
					lay-verify="required" class="layui-input" placeholder="yyyy-MM-dd HH:mm:ss">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">运费：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_freight" id="of_freight" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">支付方式：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_payment" id="of_payment" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">收货时间：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_receivetime" id="of_receivetime" required
					lay-verify="required" class="layui-input" placeholder="yyyy-MM-dd HH:mm:ss">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">完成时间：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_finishtime" id="of_finishtime" required
					lay-verify="required" class="layui-input" placeholder="yyyy-MM-dd HH:mm:ss">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">投诉商家：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_complbusine" id="of_complbusine" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">订单状态：</label>
						<div class="layui-input-inline" style="width: 120;">
							<select name="of_state" id="of_state" class="layui-input">
								<option value=''>请选择状态</option>
								<option value='下单未付款'>下单未付款</option>
								<option value='付款未发货'>付款未发货</option>
								<option value='发货未到达'>发货未到达</option>
								<option value='到达未收货'>到达未收货</option>
								<option value='收货未评价'>收货未评价</option>
								<option value='已评价'>已评价</option>
							</select>
						</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">是否退款：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_refund" id="of_refund" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">订单备注：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_message" id="of_message" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">物流信息：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_transport" id="of_transport" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">查看物流：</label>
			<div class="layui-input-inline">
				<input type="text" name="of_checklogis" id="of_checklogis" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">预留1：</label>
			<div class="layui-input-inline">
				<input type="text" name="ext1" id="ext1" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">预留2：</label>
			<div class="layui-input-inline">
				<input type="text" name="ext2" id="ext2" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<!-- <div class="layui-form-item">
			<label class="layui-form-label">预留一：</label>
			<div class="layui-input-inline">
				<input type="text" name="ext1" id="ext1" required
					lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">预留二：</label>
			<div class="layui-input-inline">
				<input type="text" name="ext2" id="ext2" required
					lay-verify="required" class="layui-input">
			</div>
		</div> -->
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit lay-filter="forDemo">提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>
	<script type="text/javascript" src="layui/layui.js"></script>
	<script>
		layui.use([ 'form', 'upload' ], function() {
			var form = layui.form;
			var $ = layui.jquery;
			var upload = layui.upload;

			//监听提交
			form.on('submit(forDemo)', function(data) {
				var d = data.field;
				d.method = "addOrderForm";
				console.log(d);
				var url = '/wk1un2_electricity_digital/Backstage/addOrderForm';
				$.post(url, d, function(data) {
					if (data.count > 0) {
						console.log('添加成功');
						var index = parent.layer.getFrameIndex(window.name);
						parent.layer.close(index);
					}
				}, "json");
				return false;
			});
		});
	</script>
		<script>
layui.use('laydate', function(){
  var laydate = layui.laydate;
//日期时间选择器
  laydate.render({
    elem: '#of_ordertime'
    ,type: 'datetime'
  });
});
layui.use('laydate', function(){
	  var laydate = layui.laydate;
	//日期时间选择器
	  laydate.render({
	    elem: '#of_deliverytime'
	    ,type: 'datetime'
	  });
	});
layui.use('laydate', function(){
	  var laydate = layui.laydate;
	//日期时间选择器
	  laydate.render({
	    elem: '#of_receivetime'
	    ,type: 'datetime'
	  });
	});
layui.use('laydate', function(){
	  var laydate = layui.laydate;
	//日期时间选择器
	  laydate.render({
	    elem: '#of_finishtime'
	    ,type: 'datetime'
	  });
	});
</script>
	
</body>
</html>